package com.sscw.tcp.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum TaskActionEnum {
    login(1, "连续登录"),
    total_recharge(2, "累计充值"),
    total_use(3, "累计消耗"),
    total_prize(4, "累计赏金"),
    total_JP1(5, "累计JP1"),
    total_JP2(6, "累计JP2"),
    total_JP3(7, "累计JP3"),
    total_ALL(8, "累计全盘奖"),
    total_critical_hit(9, "累计暴击奖"),
    ;

    private Integer code;

    private String desc;

    TaskActionEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TaskActionEnum getByCode(Integer code) {
        for (TaskActionEnum enums : TaskActionEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
